package com.example.jin.intent;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;

/**
 * Created by JIN on 2017/9/15.
 */

public class myIntent extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.intent);

        Button btn0 = (Button) findViewById(R.id.btn0);
        btn0.setOnClickListener(new Button.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent I = new Intent(Intent.ACTION_DIAL, Uri.parse("tel://144"));
                startActivity(I);
            }
        });
    }
}
